﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Collections.Specialized;

namespace Shop.Interface.Customer
{
    public abstract class ICustomerFavor
    {
        public static Dictionary<string, object> Switch(string[] switchNames)
        {
            #region 判断是否登陆，不登陆不允许使用收藏功能
            int idcus;
            bool bret = Implementation.Customer.CustomerCommon.CheckLogin(out idcus);
            if (!bret) { return Implementation.Customer.CustomerCommon.NotLogin(); }
            #endregion

            if (switchNames.Length <= 1) { return Common.ReturnValue.ErrAction(); }
            string swithname = switchNames[2];
            ICustomerFavor cv1 = new Implementation.Customer.ICustomerFavor_V1();
            switch (swithname)
            {
                case "Save":
                    return cv1.Save(idcus);
                case "Delete":
                    return cv1.Delete(idcus);
                default:
                    return Common.ReturnValue.ErrAction();
            }

        }
        public abstract Dictionary<string, object> Save(int idcus);

        public abstract Dictionary<string, object> Delete(int idcus);
    }
}